<template>
  <div>
    <h2>操作DOM元素</h2>
    <input ref="inputEl" placeholder="集中注意力" />
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'

const inputEl = ref()

onMounted(() => {
  inputEl.value.focus()
})
</script>

<style></style>
